<template>
  <div class="message-type-demo">
    <MButton type="primary" @click="handleOffsetClick"
      >自定义位置偏移量</MButton
    >
  </div>
</template>
<script lang="ts">
import { messageA } from "/@/m-ui";
import { defineComponent } from "vue";
export default defineComponent({
  components: {},
  setup() {
    const handleOffsetClick = () => {
      const height = window.innerHeight - 100;
      messageA({
        message: "不出意外它在底下",
        offset: height,
      });
    };
    return {
      handleOffsetClick,
    };
  },
});
</script>

<style>
.message-type-demo .m-button {
  margin: 10px;
}
</style>
